package net.cloudsun.graph.core;

/**
 * 加权图的边
 *
 * @author Ryan
 * @since 1.2
 */
public class WeightedEdge {
    private int from;
    private int to;
    /**
     * 权重
     */
    private int weight;
    public WeightedEdge(int from, int to, int weight) {
        this.from = from;
        this.to = to;
        this.weight = weight;
    }

    public int getFrom() {
        return from;
    }

    public int getTo() {
        return to;
    }

    public int getWeight() {
        return weight;
    }
}
